const Mock = require('mockjs');
const mockData = Mock.mock({
  'list|30': [{
    userUid: '@id',
    'browser|1': ["chrome", "weixin", "Unknow"],
    username: "@name",
    ip: "@ip",
    nickname: "@name",
    loginTime: "@datetime"
  }]
})

module.exports = [
  {
    url: "/sys/monitor/onlineUser/getAll",
    type: "post",
    response: () => {
      return {
        msg: "操作成功",
        code: 200,
        data: {
          msg: "获取所有在线用户",
          code: 200,
          data: mockData.list,
          success: true,
          time: "2021-03-11 11:23:59"
        },
        success: true,
        time: "2021-03-10 16:43:50"
      };
    }
  },
  {
    url: "/sys/monitor/onlineUser/forceOut",
    type: "post",
    response: config => {
      return {
        msg: "删除成功",
        code: 200,
        data: null,
        success: true,
        time: "2021-03-10 16:43:50"
      };
    }
  }
];
